package cn.laixueit.controller;

import cn.laixueit.exception.UserException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/ex")
public class ExceptionController {

    @RequestMapping("/index")
    public String index(){
        int i = 1/0;
        return "index";
    }

    @RequestMapping("/index2")
    public void index2() throws Exception {
        throw  new UserException();
    }
}
